package hqu.cst.XAH.pojo;

import jakarta.validation.Valid;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
@Data
public class Comment {
	private Long id;
	@Valid
	private Long movie;
	@NotBlank(message="评论内容不能为空")
	@Size(max=500,message="评论长度不能超过500个字符")
	private String content;
	@NotNull(message="评分不能为空")
	@Min(value=1,message="评分至少为1")
	@Max(value=5,message="评分不能超过5")
	private Integer rating;

}
